package com.sihan.swvp.service.jc;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.sihan.swvp.dao.jc.JcBdzDao;
import com.sihan.swvp.entity.jc.JcBdz;
@Service
public class JcBdzService{

	@Autowired
	private JcBdzDao bdzDao;
	
	public List<Map<String, Object>> getJcBdz(Map<String, Object> params) {
		
		return bdzDao.getJcBdz(params);
	}
	
	public List<Map<String, Object>> getJcBdzAll(Map<String, Object> params) {
		return bdzDao.getJcBdzAll(params);
	}

	public void addJcBdz(JcBdz bean) {
		bdzDao.addJcBdz(bean);
	}

	public void updateJcBdz(JcBdz bean) {
		bdzDao.updateJcBdz(bean);
	}

	public int deleteJcBdz(Integer id) {
		return bdzDao.deleteJcBdz(id);
	}
	
	public boolean getJcBdzValidate(String bdzCode,String bdzName,Integer id,Integer jcDsdwId) {
		boolean isOk=false;
		Integer nubmer=bdzDao.getJcBdzValidate(bdzCode,bdzName,id,jcDsdwId);
		if(nubmer!=0){
			isOk=true;
		}
		return isOk;
	}
}
